/* 全局样式 */
:root {
    --primary-color: #28a745;
    --primary-dark: #218838;
    --text-color: #333;
    --light-gray: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.25); /* 更透明的背景 */
    backdrop-filter: blur(12px); /* 毛玻璃效果 */
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 半透明边框 */
    transition: var(--transition);
}
.nav-buttons {
    display: flex;
    gap: 1.5rem;
}
.navbar:hover {
    background-color: rgba(255, 255, 255, 0.35); /* 悬停时略微加深 */
}

/* 背景图片 */
.background {
    position: fixed; /* 改为fixed避免滚动问题 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('jida.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(3px) brightness(0.9); /* 增加亮度调节 */
    z-index: -1;
}

/* 主容器样式 */
.main-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 8rem 2rem 3rem;
    width: 100%;
}

/* 容器样式 */
.container {
    background-color: rgba(255, 255, 255, 0.97);
    padding: 3rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
    backdrop-filter: blur(8px);
    min-height: 80vh;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* 搜索框样式 */
.search-container {
    display: flex;
    margin-bottom: 2.5rem;
    gap: 1rem;
}
.search-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


.search-container input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
    border-color: var(--primary-color);
}
.search-container button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.search-container button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e7e34);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}


.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 话题列表样式 */
.topics-list {
    margin-bottom: 3rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 15px;
}

/* 自定义滚动条 */
.topics-list::-webkit-scrollbar {
    width: 8px;
}

.topics-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.topics-list::-webkit-scrollbar-thumb {
    background: rgba(40, 167, 69, 0.6);
    border-radius: 4px;
}

.topics-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
/* 欢迎文字样式 */
.welcome-text {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-text h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.welcome-text p {
    font-size: 1.3rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 表单容器样式 */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 表单元素样式 */
form {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

input:focus, textarea:focus, select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
    outline: none;
}
/* 禁用评论区域 */
.comment-disabled {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    margin-top: 2rem;
}
/* 按钮样式 */
.button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
    letter-spacing: 0.5px;
}

.button:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e7e34);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
}

.button:active {
    transform: translateY(0);
}



/* 链接样式 */
p a {
    color: #28a745;
    text-decoration: none;
}

p a:hover {
    text-decoration: underline;
}
/* 话题列表样式 - 加长版 */
.topics-list {
    margin-bottom: 2rem;
    max-height: 60vh; /* 限制最大高度 */
    overflow-y: auto; /* 添加滚动条 */
    padding-right: 10px; /* 为滚动条留空间 */
}

.topic {
    background-color: var(--white);
    padding: 2.2rem;
    border-radius: 15px;
    margin-bottom: 2.2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-left: 6px solid var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.topic:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.topic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), transparent);
    z-index: 0;
}

.topic h2 {
    color: #2c3e50;
    margin-bottom: 1.2rem;
    font-weight: 650;
    font-size: 1.7rem;
    position: relative;
    line-height: 1.4;
}

.topic p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    position: relative;
    font-size: 1.1rem;
}

.topic-image {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.topic-image:hover {
    transform: scale(1.03);
}


.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #666;
    position: relative;
}
/* 回复列表样式 */
.replies-list {
    margin-bottom: 2.5rem;
}

.reply {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #6c757d;
    transition: var(--transition);
}

.reply:hover {
    background-color: #e9ecef;
    transform: translateX(8px);
}

.reply p {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.reply small {
    display: block;
    color: #888;
    font-size: 0.92rem;
}

/* 回复表单样式 */
.reply-form {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.reply-form h2 {
    margin: 0 0 10px;
    font-size: 1.5em;
}

.reply-form label {
    display: block;
    margin-bottom: 10px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.reply-form button {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.reply-form button:hover {
    background-color: #218838;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
small {
    color: #6c757d;
    font-size: 0.85rem;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container, .topic, .reply {
    animation: fadeIn 0.6s ease forwards;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .main-container {
        padding: 7rem 1.5rem 2rem;
    }
    
    .container {
        padding: 2rem;
        width: 95%;
    }
    
    .topic {
        padding: 1.8rem;
    }
    
    .welcome-text h1 {
        font-size: 2.2rem;
    }
    
    .welcome-text p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        gap: 1rem;
    }
    
    .container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-container button {
        width: 100%;
    }
    
    .topic {
        padding: 1.5rem;
    }
    
    .topic h2 {
        font-size: 1.5rem;
    }
}